package main

import (
	"go_web/mapper"

	"github.com/gin-gonic/gin"
)

func main() {
	r := gin.Default()

	// 路由组
	router := r.Group("/hjh")

	{
		router.GET("/ping", func(ctx *gin.Context) {
			ctx.JSON(200, gin.H{
				"message": "hjh-pong",
			})
		})

		router.POST("/create", mapper.Asset{}.Create)
		router.GET("/query", mapper.Asset{}.Query)
		router.POST("/transfer", mapper.Asset{}.Transfer)
	}

	r.Run(":8080")
}
